class baseModel {
    constructor(data, msg, code) {
        if (typeof data === "string" && typeof msg === "string") {
            [msg, data] = [data, undefined];
        }

        if (typeof data === "string") {
            [data, msg] = [msg, data];
        }
        this.data = data;
        this.msg = msg;
        this.code = code;
    }
}


class successModel extends baseModel {
    constructor(data, msg="成功操作") {
        super(data, msg, 200);
    }
}

class notFoundModel {

}

module.exports = { successModel, notFoundModel }

